package com.bnz.service.impl;

import cn.hutool.db.Session;
import com.bnz.mapper.ClassesMapper;
import com.bnz.pojo.Classes;
import com.bnz.service.ClassesService;
import com.bnz.util.MyBatisUtil;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

public class ClassesServiceImpl implements ClassesService {
    @Override
    public List<Classes> findAll() {

        try(SqlSession session= MyBatisUtil.getSqlSession()){
            ClassesMapper mapper=session.getMapper(ClassesMapper.class);

            List<Classes> classes=mapper.findAll();
            return classes;
        }



    }
}
